﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/AdminMasterPage.master" EnableEventValidation="false"
    AutoEventWireup="true" CodeFile="VideoGallery.aspx.cs" Inherits="Admin_VideoGalery " %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
<script  type="text/javascript" language="javascript">
    function onCancel() {
        return false;
    }
</script>
    <style type="text/css">
        .style1
        {
            height: 37px;
        }
        .style2
        {
            height: 37px;
            width: 76px;
        }
        .style3
        {
            width: 76px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:Label runat="server" ID="lbl1" Text="Новая галерея"></asp:Label><br />
    <table border="0" cellspacing="3">
        <tr>
            <td>
                <asp:HiddenField runat="server" ID="HfID" />
                <asp:Label runat="server" ID="lblTitleRu" Text="Заголовок на русском"></asp:Label>
            </td>
            <td>
                <asp:TextBox runat="server" ID="txtTitleRU" Width="320px"></asp:TextBox><br />
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label runat="server" ID="lblTitleHeb" Text="Заголовок на иврите"></asp:Label>
            </td>
            <td>
                <asp:TextBox runat="server" ID="txtTitleHEB" Width="320px" style="direction:rtl;text-align:right;"></asp:TextBox><br />
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label runat="server" ID="Label1" Text="описание на русском"></asp:Label>
            </td>
            <td>
                <asp:TextBox runat="server" ID="txtDescRU" TextMode="MultiLine" Width="320px" ></asp:TextBox><br />
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label runat="server" ID="Label2" Text="описание на иврите" ></asp:Label>
            </td>
            <td>
                <asp:TextBox runat="server" ID="txtDescHEB" TextMode="MultiLine" Width="320px" style="direction:rtl;text-align:right;"></asp:TextBox><br />
            </td>
        </tr>
    </table>
    <asp:Button runat="server" ID="btnAddGalery" Text="Добавить" OnClick="btnAddGalery_Click" />
    <asp:DataList ID="dlGallery" runat="server" RepeatColumns="6" RepeatDirection="Horizontal"
        GridLines="Horizontal" onitemdatabound="dlGallery_ItemDataBound">
        <ItemTemplate>
            <table>
                <tr>
                    <td rowspan="2">
                        <asp:ImageButton runat="server" ID="ImageButton1" ImageUrl="../images/Folder.png"
                            CommandArgument='<%# Eval("ID") %>' CausesValidation="false" OnClick="imgGallery_Click" />
                    </td>
                    <td >
                        <asp:ImageButton runat="server" ID="imgUpdate" CommandArgument='<%# Eval("ID")%>'
                            Visible='<%# Convert.ToBoolean((Convert.ToInt32(Eval("ID"))>2)?"true":"false")%>'
                            AlternateText="Edit" ToolTip="Редактировать" ImageUrl="~/Admin/images/edit.png"
                            OnClick="imgEdit_Click" />
                    </td>
                </tr>
                <tr style="height:">
                    <td >
                        <asp:ImageButton runat="server" ID="imgDelete" CommandArgument='<%# Eval("ID")%>'
                            Visible='<%# Convert.ToBoolean((Convert.ToInt32(Eval("ID"))>2)?"true":"false")%>'
                            AlternateText="Delete" ToolTip="Удалить галерею" ImageUrl="~/Admin/images/delete.png"
                            OnClick="imgDelete_Click" />
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <asp:Label runat="server" ID="lblDescRu" Text='<%# Eval("titleRU") %>'></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <asp:Label runat="server" ID="lblDescHeb" Text='<%# Eval("titleHEB") %>'></asp:Label>
                    </td>
                </tr>
            </table>
        </ItemTemplate>
        <SeparatorTemplate>
            <span>
                <table width="30px">
                    <tr>
                        <td>
                        </td>
                    </tr>
                </table>
            </span>
        </SeparatorTemplate>
    </asp:DataList>
</asp:Content>
